package com.zhong.gang.app.ui.examine.adpter;

import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zhong.gang.app.R;
import com.zhong.gang.app.ui.examine.adpter.modle.ExamineProgressBean;
import com.zhong.gang.applib.utils.TimeUtils;

public class ExamineProgressAdapter extends BaseQuickAdapter<ExamineProgressBean, BaseViewHolder> {
    public ExamineProgressAdapter() {
        super(R.layout.item_pay_ment);
    }

    @Override
    protected void convert(BaseViewHolder helper, ExamineProgressBean item) {
        helper.setText(R.id.type_name,item.getPmDes());
        helper.setText(R.id.name,item.getPmName());
        TextView statusTv = helper.getView(R.id.status);
        if (item.getStatus() == 0) {
            statusTv.setTextColor(mContext.getResources().getColor(R.color.OrangeRed));
            helper.setText(R.id.status, "待审核");
        }else {
            statusTv.setTextColor(mContext.getResources().getColor(R.color.gray3));
            if (item.getStatus() == 1)
                helper.setText(R.id.status, "审核不通过");
            else
                helper.setText(R.id.status, TimeUtils.getTime(item.getUpdateTime()));
        }
    }
}
